-- GENERATED SPELL FOR [Unyielding Sorcerer] --


function spell0_16905(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16905', 3000, 1)
end

function spell1_16905(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(11829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16905', 11000, 1)
end

function spell2_16905(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_16905', 8259, 1)
end

function Sorts_16905(pUnit, Event)
local choix_sorts_16905 = math.random(0, 2)
if choix_sorts_16905 == 0 then
pUnit:RegisterEvent('spell0_16905', 1, 1)
end
if choix_sorts_16905 == 1 then
pUnit:RegisterEvent('spell1_16905', 1, 1)
end
if choix_sorts_16905 == 2 then
pUnit:RegisterEvent('spell2_16905', 1, 1)
end
end

function mob16905_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16905', math.random(1500, 3000), 1)
end

function mob16905_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16905_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16905_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16905, 1, 'mob16905_Action')
RegisterUnitEvent(16905, 2, 'mob16905_Leave')
RegisterUnitEvent(16905, 3, 'mob16905_Kill')
RegisterUnitEvent(16905, 4, 'mob16905_Die')
